package co.fitstart.signin.service.impl;

import org.springframework.stereotype.Service;

import com.demo2do.core.persistence.annotation.Dao;

import co.fitstart.entity.coach.PrincipalReportRelation;
import co.fitstart.entity.principal.Principal;
import co.fitstart.signin.dao.PrincipalDao;
import co.fitstart.signin.service.PrincipalService;

/**
 * 
 * @author dan
 *
 */
@Service("principalService")
public class PrincipalServiceImpl extends DataServiceImpl<Principal> implements PrincipalService{
    
    @Dao
    private PrincipalDao principalDao;

    /*
     * (non-Javadoc)
     * @see co.fitstart.signin.service.PrincipalService#loadByName(java.lang.String)
     */
    public Principal loadByName(String name) {
        return principalDao.load(name);
    }
    
    /*
     * (non-Javadoc)
     * @see co.fitstart.signin.service.PrincipalService#getRelation(co.fitstart.entity.principal.Principal)
     */
    public PrincipalReportRelation getRelation(Principal principal) {
        return principalDao.getRelation(principal);
    }

}
